package com.agent.auth.controller;

import com.agent.common.utils.JwtUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;

/**
 * Jwk开放端口
 */
@RestController
@RequiredArgsConstructor
public class JwkSetController {

    private final JwtUtils jwtUtils;

    /**
     * 获取公钥
     *
     * @return 公钥
     */
    @GetMapping("/rsa/publicKey")
    public Map<String, Object> getJwkSet() {
        return jwtUtils.getJwkSet();
    }
}